from click import *


@group()
def todo():
    pass


@todo.command()
@option("--state", default="all", help="new or done,finish or unfinish")
def list(state):
    print(f"查询操作:{state}")


@todo.command()
# @argument("task_desc") # Missing argument "TASK_DESC".
# @option("--name") # 不符合需求
def add(task_desc):
    print(f"新增操作: {task_desc}")


todo.add_command(list)
todo.add_command(add)

if __name__ == '__main__':
    todo()